<?php
$this->pageTitle = "About " . $producer['Member']['business_name'];
?>
<div class="vcard">
	<h3 class="fn org"><?=$producer['Member']['business_name'], ' ', $html->link('[Our Products]', array('controller'=>'producers', 'action'=>'products', $producer['Producer']['producer_id']), array('class'=>'action'))?></h3>
<?php if($producer['Producer']['pub_address']) {
?>
	<div class="adr">
		<p class="street-address"><?=$producer['Member']['work_address_line1'];?>
		<?php if (!empty($producer['Member']['work_address_line2'])) {
			?>
			</p><p class="extended-address"><?php echo $producer['Member']['work_address_line2'];
		}?></p>
		<p><span class="locality"><?=$producer['Member']['work_city']?></span>, 
			<span class="region"><?=$producer['Member']['work_state']?></span> 
			<span class="postal-code"><?=$producer['Member']['work_zip']?></span>
		</p>
	</div>
<?php 
}

if (($producer['Producer']['pub_phonew']) && !empty($producer['Member']['work_phone'])) {
?>
	<div class="tel"><span class="type">Work</span> Phone: <span class="value"><?=$producer['Member']['work_phone']?></span></div>
<?php
}

if (($producer['Producer']['pub_phonec']) && !empty($producer['Member']['mobile_phone'])) {
?>
	<div class="tel"><span class="type">Cell</span> Phone: <span class="value"><?=$producer['Member']['mobile_phone']?></span></div>
<?php
}

if (($producer['Producer']['pub_phonet']) && !empty($producer['Member']['toll_free'])) {
?>
	<div class="tel"><span class="type">Toll Free</span> Phone: <span class="value"><?=$producer['Member']['toll_free']?></span></div>
<?php
}

if (($producer['Producer']['pub_phoneh']) && !empty($producer['Member']['home_phone'])) {
?>
	<div class="tel"><span class="type">Home</span> Phone: <span class="value"><?=$producer['Member']['home_phone']?></span></div>
<?php
}

if (($producer['Producer']['pub_fax']) && !empty($producer['Member']['fax'])) {
?>
	<div class="tel"><span class="type">Fax</span>: <span class="value"><?=$producer['Member']['fax']?></span></div>
<?php
}

if (($producer['Producer']['pub_email']) && !empty($producer['Member']['email_address'])) {
?>
	<div>Email: <a class="email" href="mailto:<?=$producer['Member']['email_address']?>"><?=$producer['Member']['email_address']?></a></div>
<?php
}

if (($producer['Producer']['pub_email2']) && !empty($producer['Member']['email_address_2'])) {
?>
	<div>Email (alternate): <a class="email" href="mailto:<?=$producer['Member']['email_address_2']?>"><?=$producer['Member']['email_address_2']?></a></div>
<?php
}

if (($producer['Producer']['pub_web']) && !empty($producer['Member']['home_page'])) {
	if (strpos($producer['Member']['home_page'],'http://')===false) {
		$producer['Member']['home_page'] = 'http://' . $producer['Member']['home_page'];
	}
	?>
	<div>Online At: <a class="url" href="<?=$producer['Member']['home_page']?>"><?=$producer['Member']['home_page']?></a></div>
<?php
}
?>
</div>
<?php if (!empty($producer['Producer']['about'])) { ?>
<h4>About Us</h4>
<?=$markdown->parse($producer['Producer']['about'])?>
<?php }
if (!empty($producer['Producer']['ingredients'])) { ?>
<h4>Ingredients We Use</h4>
<?=$markdown->parse($producer['Producer']['ingredients'])?>
<?php }
if (!empty($producer['Producer']['practices'])) { ?>
<h4>Our Practices</h4>
<?=$markdown->parse($producer['Producer']['practices'])?>
<?php }
if (!empty($producer['Producer']['highlights'])) { ?>
<h4>Highlights</h4>
<?=$markdown->parse($producer['Producer']['highlights'])?>
<?php }
if (!empty($producer['Producer']['additional'])) { ?>
<h4>Misc.</h4>
<?=$markdown->parse($producer['Producer']['additional'])?>
<?php } 

echo '<p>' . $html->link("View our products",'/producers/products/' . $producer['Producer']['producer_id']) . '</p>';
?>
